home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
comm
/
tcp
/
Amster.lha
/
Amster_Install
/
Install_Amster
< prev
next >
Wrap
Text File
|
2000-07-31
|
6KB
|
272 lines
; $VER: Install_Amster 0.7a (31.7.2000)
(procedure P_check-system-version
(set #exec-version (/ (getversion) 65536))
(if (< #exec-version 39)
(abort "Amster needs Kickstart 3.0 or higher.\n")
)
(set #mui-version (/ (getversion "LIBS:muimaster.library") 65536))
(if (< #mui-version 19)
(abort "Amster needs MUI 3.8+.\n")
)
(set #nlist-version (/ (getversion "LIBS:MUI/NList.mcc") 65536))
(if (< #nlist-version 19)
(abort "Amster needs MCC_NList 19.x+\n")
)
(set #lamp-version (/ (getversion "LIBS:MUI/Lamp.mcc") 65536))
(if (< #lamp-version 11)
(abort "Amster needs MCC_Lamp 11.x+\n")
)
(set #os-version (/ (getversion "LIBS:version.library") 65536))
)
(procedure P_select-destination-directory
(if (exists "Work:" (noreq))
(set @default-dest "Work:")
(set @default-dest "SYS:")
)
(set @default-dest
(askdir
(prompt "Select the directory where you want to install Amster. A new directory will be created.")
(help "No help available.")
(default @default-dest)
)
)
(set @default-dest (tackon @default-dest "Amster/"))
)
(procedure P_select-languages
(set #catalog 19)
(set #n 0)
(while (set #thislang (select #n
"català" "czech" "dansk" "nederlands" "suomi"
"français" "deutsch" "magyar" "italiano" "norsk" "português"
"russian" "slovenian" "español" "svenska" "türkçe" ""))
(
(if (= @language #thislang) (set #catalog #n))
(set #n (+ #n 1))
)
)
(set #n 0)
(set #catalogs 1)
(until (= #n #catalog)
(set #catalogs (* #catalogs 2))
(set #n (+ #n 1))
)
(if (= @user-level 2)
(set #catalogs
(askoptions
(prompt "Select the languages you want to install.")
(help "Checkmark the languages you want to install, and click 'Proceed'.")
(choices
"Catalan" "Czech" "Danish" "Dutch" "Finnish"
"French" "German" "Hungarian" "Italian" "Norwegian" "Portuguese"
"Russian" "Slovenian" "Spanish" "Swedish" "Turkish")
(default #catalogs)
)
)
)
(if (> #catalogs 0)
(makedir (tackon @default-dest "Catalogs/"))
)
(set #n 0)
(while (set #thislang (select #n
"català" "czech" "dansk" "nederlands" "suomi"
"français" "deutsch" "magyar" "italiano" "norsk" "português"
"russian" "slovensko" "español" "svenska" "türkçe" ""))
(
(if (IN #catalogs #n)
(copyfiles
(source (tackon #source-dir (cat "Catalogs/" #thislang "/Amster.catalog")))
(dest (tackon @default-dest (cat "Catalogs/" #thislang)))
)
)
(set #n (+ #n 1))
)
)
)
(procedure P_copy-sources
(if (= @user-level 2)
(
(set #copy-source
(askchoice
(help @askchoice-help)
(prompt "Do you want to install sources?")
(choices "Yes" "No")
(default 1)
)
)
(if (= #copy-source 0)
(
(set #SourceDir (tackon @default-dest "Source"))
(if (not (exists #SourceDir)) (makedir #SourceDir))
(copyfiles
(source (tackon #source-dir "Source/"))
(dest #SourceDir)
(all)
)
)
)
)
)
)
(welcome "Welcome to the Amster 0.7a installation.\n")
(set @app-name "Amster 0.7a")
(P_check-system-version)
(complete 0)
(set #source-dir (if (= 1 (exists @icon)) (pathonly (expandpath @icon))
(expandpath @icon))
)
(P_select-destination-directory)
(complete 10)
(makedir @default-dest (infos))
(complete 20)
(P_select-languages)
(complete 30)
; Copy program file and documentation
(copyfiles
(help @copyfiles-help)
(prompt "Install program and documentation.")
(confirm)
(source #source-dir)
(dest @default-dest)
(pattern "(README|COPYING|CHANGES|(Amster)(|.guide)(|.servers))")
(noposition)
)
(complete 50)
; Copy ARexx scripts
(set #RexxDir (tackon @default-dest "Rexx"))
(if (not (exists #RexxDir)) (makedir #RexxDir))
(copyfiles
(help @copyfiles-help)
(prompt "Select the ARexx scripts you want to install.")
(confirm)
(source (tackon #source-dir "Rexx/"))
(dest #RexxDir)
(all)
)
(complete 60)
; Copy icons
(set #Icons 1)
(if (< #os-version 44)
(set #Icons 0)
)
(if (= @user-level 2)
(set #Icons
(askchoice
(help @askchoice-help)
(prompt "Which icons do you want to install?")
(choices "NewIcons" "OS3.5 icons")
(default #Icons)
)
)
)
(set #IconSource
(select #Icons
"Icons/NewIcons/"
"Icons/OS3.5/"
)
)
(set #IconDir (tackon @default-dest "Icons"))
(if (not (exists #IconDir)) (makedir #IconDir))
(copyfiles
(help @copyfiles-help)
(source (tackon #source-dir #IconSource))
(dest #IconDir)
(pattern "Amster_(on|off)line.info")
)
(copyfiles
(help @copyfiles-help)
(source (tackon (tackon #source-dir #IconSource) "Amster.info"))
(dest @default-dest)
)
(complete 65)
(if (exists (tackon @default-dest "Amster.guide"))
(copyfiles
(help @copyfiles-help)
(source (tackon (tackon #source-dir #IconSource) "Guide.info"))
(dest @default-dest)
(newname "Amster.guide.info")
)
)
(if (exists (tackon @default-dest "README"))
(copyfiles
(help @copyfiles-help)
(source (tackon (tackon #source-dir #IconSource) "Guide.info"))
(dest @default-dest)
(newname "README.info")
)
)
(if (exists (tackon @default-dest "COPYING"))
(copyfiles
(help @copyfiles-help)
(source (tackon (tackon #source-dir #IconSource) "Guide.info"))
(dest @default-dest)
(newname "COPYING.info")
)
)
(if (exists (tackon @default-dest "CHANGES"))
(copyfiles
(help @copyfiles-help)
(source (tackon (tackon #source-dir #IconSource) "Guide.info"))
(dest @default-dest)
(newname "CHANGES.info")
)
)
(complete 70)
(P_copy-sources)
(complete 90)
; Show README
;(showmedia 'media' "README" 'upper_left' 'medium' 1)
(complete 100)
(exit "The installation of Amster is finished.")
(closemedia media)